package top.wshape1.shiziapi.uaa.service;

import jakarta.servlet.http.HttpServletResponse;
import top.wshape1.shiziapi.common.domain.to.UserTokenTo;

/**
 * @author Wshape1
 * @version 1.0
 * @description
 * @since 2023-08-24
 */

public interface JwtService {

    /**
     * 生成新的Jwt Token
     *
     * @param id
     * @param oldToken
     * @return
     */
    UserTokenTo renewJwt(Long id, String oldToken);

    /**
     * 获取新的Jwt Token 并设置New-Token响应头
     *
     * @param id
     * @param oldToken
     * @param response
     */
    void setNewToken(Long id, String oldToken, HttpServletResponse response);

}
